home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / daten / astrolog / src / dmakefile < prev    next >
Makefile  |  1995-08-11  |  4KB  |  170 lines

  1. # ASTROLOG -*- Makefile -*- for Matt Dillon's nice DICE (Amiga)
  2. #
  3. # (c)Copyright 1995 by Tobias Ferber,  All Rights Reserved
  4.  
  5. # $VER: $Id: DMakefile,v 1.8 1995/08/11 12:17:02 tf Exp $
  6.  
  7. CC      = dcc
  8. CFLAGS  = -3.1 -030 -882 -s
  9. #CFLAGS  = -DMUIGUI -3.1 -030 -s
  10.  
  11. AS      = a68k
  12. AFLAGS  = -d -Idinclude:amiga20/asm/
  13.  
  14. RM      = delete quiet
  15. CP      = copy quiet clone
  16.  
  17. objs = astrolog.o data.o data2.o general.o io.o \
  18.  calc.o matrix.o placalc.o placalc2.o \
  19.  charts0.o charts1.o charts2.o charts3.o intrpret.o \
  20.  xdata.o xgeneral.o xdevice.o xcharts0.o xcharts1.o xcharts2.o xscreen.o
  21.  
  22. xobjs = amiga.o rastport.o getkey.o xtras.o
  23. #xobjs = amiga-mui.o getkey.o
  24.  
  25. srcs = $(objs:*.o:*.c) $(xobjs:*.o:*.c)
  26. libs = -lm -lc -lamiga30
  27. #libs = -lm -lc -lmuil -lamiga30
  28. prog = astrolog
  29.  
  30. # for the documentation
  31.  
  32. stem        = astrolog
  33. suffix      = texi
  34. #suffix      = texinfo
  35. makeguide   = makeguide --amiga-39
  36. #makeguide   = makeinfo --amiga
  37. guide2doc   = guide2doc
  38. #guide2doc   = ag2txt
  39. texindex    = texindex
  40. tex         = virtex &tex
  41. dvips       = dvips
  42.  
  43. # for the distribution
  44.  
  45. distfiles= astrolog.000 astrolog.030 astrolog.dat \
  46.  Helpfile.440 Update.440 README.440 LRZ5_24 CHI_24 file_id.diz
  47.  
  48. arcname = ast44pl5
  49. distdir = $(arcname)
  50.  
  51. #
  52.  
  53. all: $(prog)
  54.  
  55. $(prog): $(objs) $(xobjs) ellipse.o
  56.     $(CC) $(CFLAGS) -mC $(libs) -o %(left) %(right)
  57.  
  58. $(objs) $(xobjs): $(srcs)
  59.     $(CC) $(CFLAGS) -mC -mD -c -o %(left) %(right)
  60.  
  61. ellipse.o: ellipse.asm
  62.     $(AS) %(right) $(AFLAGS) -o%(left)
  63.  
  64. # .PHONY targets
  65.  
  66. 000:
  67.     echo >ram:000.cvt "*"-030 -882*"->*"*";"
  68.     cvt -s -f ram:000.cvt DMakefile -o %s.000
  69.     delete quiet ram:000.cvt
  70.     dmake -a -f DMakefile.000 astrolog
  71.     rename astrolog astrolog.000
  72.  
  73. 030:
  74.     dmake -a astrolog
  75.     rename astrolog astrolog.030
  76.  
  77. bumprev:
  78.     execute cico
  79.  
  80. clean:
  81.     $(RM) $(prog) $(objs) $(xobjs)
  82.     $(RM) $(stem).(log|toc|aux|cp|fn|vr|ky|pg|au|cps|fns|vrs|kys|pgs|aus|tp) ShowDVI.log
  83.  
  84. veryclean: clean
  85.     $(RM) $(prog).000 $(prog).030
  86.     $(RM) $(stem).(guide|doc|dvi|ps) astdev.doc
  87.  
  88. # documentation
  89.  
  90. docs: guide index dvi ps
  91.  
  92. guide: $(stem).guide
  93.  
  94. $(stem).guide: $(stem).$(suffix)
  95.     $(makeguide) -o %(left) %(right)
  96.  
  97. # $(tex) generiert die .(log|toc|aux|dvi) dateien
  98.  
  99. dvi: $(stem).dvi
  100.  
  101. $(stem).dvi: $(stem).$(suffix)
  102.     $(tex) %(right)
  103.  
  104. ps: $(stem).ps
  105.  
  106. $(stem).ps: $(stem).dvi
  107.     $(dvips) $(stem).dvi
  108.  
  109. # $(texindex) creates the #?.(cps|fns|vrs|kys|pgs|aus) files
  110.  
  111. index:
  112.     $(texindex) $(stem).cp
  113.     $(texindex) $(stem).fn
  114.     $(texindex) $(stem).vr
  115.     $(texindex) $(stem).ky
  116.     $(texindex) $(stem).pg
  117.     $(texindex) $(stem).au
  118.  
  119. book: $(stem).$(suffix)
  120.     $(tex) $(stem).$(suffix)
  121.     $(tex) $(stem).$(suffix)
  122.     $(texindex) $(stem).cp
  123.     $(texindex) $(stem).fn
  124.     $(texindex) $(stem).vr
  125.     $(texindex) $(stem).ky
  126.     $(texindex) $(stem).pg
  127.     $(texindex) $(stem).au
  128.     $(tex) $(stem).$(suffix)
  129.  
  130. # autodocs
  131.  
  132. astdev.doc: amiga.c xtras.c rastport.c
  133.     adoc -c -t -I -Wall -o %(left) #?.(c|h)
  134.  
  135. # This used to be the distribution target before we included source code and documentation
  136.  
  137. usrdist:
  138.     mkdir $(distdir)
  139.     $(CP) $(distfiles) $(distdir)/
  140.     mkdir $(distdir)/doc
  141.     $(CP) $(stem).$(suffix) $(stem).guide $(stem).dvi $(stem).ps astdev.doc $(distdir)/doc/
  142.     mkdir $(distdir)/src
  143.     $(CP) $(srcs) $(xobjs:"*.o":"*.c") ellipse.s ellipse.asm DMakefile Makefile Distfile $(distdir)/src/
  144.     lha -a -e -r -x a $(arcname).lha $(distdir)
  145.     delete all quiet $(distdir)
  146.  
  147. #
  148.  
  149. dist:
  150.     mkdir $(distdir)-000 $(distdir)-030 $(distdir)-doc $(distdir)-src
  151.         cpdist -D000 $(distdir)-000/
  152.         cpdist -D030 $(distdir)-030/
  153.         cpdist -DDOC $(distdir)-doc/
  154.         cpdist -DSRC $(distdir)-src/
  155.     lha -a -e -r -x a $(arcname)-000.lha $(distdir)-000
  156.     lha -a -e -r -x a $(arcname)-030.lha $(distdir)-030
  157.     lha -a -e -r -x a $(arcname)-doc.lha $(distdir)-doc
  158.     lha -a -e -r -x a $(arcname)-src.lha $(distdir)-src
  159.     delete all quiet $(distdir)-000 $(distdir)-030 $(distdir)-doc $(distdir)-src
  160.     $(CP) readme.amiga $(arcname)-000.readme
  161.     $(CP) readme.amiga $(arcname)-030.readme
  162.     $(CP) readme.amiga $(arcname)-doc.readme
  163.     $(CP) readme.amiga $(arcname)-src.readme
  164.  
  165. distclean:
  166.     delete all quiet $(distdir)-(000|030|doc|src)(%|.lha|.readme)
  167.  
  168. #    tar cf $(arcname).tar $(distdir)
  169. #    gzip -9 $(arcname).tar
  170.